﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Drawing;

namespace Exentials.Xoox.Styles
{
    public class XColor : XElementBase
    {

        private XAttributeBase<Boolean> _auto;
        private XAttributeBase<int> _indexed;
        private XAttributeBase<string> _rgb;
        private XAttributeBase<int> _theme;
        private XAttributeBase<double> _tint;

        //3 <attribute name="auto" type="xsd:boolean" use="optional"/>
        //4 <attribute name="indexed" type="xsd:unsignedInt" use="optional"/>
        //5 <attribute name="rgb" type="ST_UnsignedIntHex" use="optional"/>
        //6 <attribute name="theme" type="xsd:unsignedInt" use="optional"/>
        //7 <attribute name="tint" type="xsd:double" use="optional" default="0.0"/>

        public XColor(string tag)
            : base(tag)
        {
            _auto = new XAttributeBase<bool>(this, "auto");
            _indexed = new XAttributeBase<int>(this, "indexed");
            _rgb = new XAttributeBase<string>(this, "rgb");
            _theme = new XAttributeBase<int>(this, "theme");
            _tint = new XAttributeBase<double>(this, "tint");
        }

        public bool Auto
        {
            get { return _auto.Value; }
            set { _auto.Value = value; }
        }

        public int Indexed
        {
            get { return _indexed.Value; }
            set { _indexed.Value = value; }
        }

        public string Rgb
        {
            get { return _rgb.Value; }
            set { _rgb.Value = value; }
        }

        public int Theme
        {
            get { return _theme.Value; }
            set { _theme.Value = value; }
        }

        public double Tint
        {
            get { return _tint.Value; }
            set { _tint.Value = value; }
        }

    }
}
